#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>


int numTrees(int n)
{
    long long C = 1;
    for (int i = 0; i < n; ++i) {
        C = C * 2 * (2 * i + 1) / (i + 2);
    }
    return (int)C;
}